﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlSetSKUForTDV.ascx.cs" Inherits="UserControl_ControlSetSKUForTDV" %>



<script type="text/javascript">
   


    function pageLoad() {



        $(".direct_margin_topbottom").click(function () {

            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });

        });
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }

    }

</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div class="direct_container_right_titletop">
            Phân tuyến cho TDV
        </div>
        <hr />
        <!-- Button chuc nang-->
        <div class="direct_container_main">
        </div>   
        <div class="direct_container_form_right">
         <table border="0" width="100%">
                         <tr>
                            <td colspan="2">
                               Bước 1:Chọn trình dược viên để :
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:RadioButtonList RepeatDirection="Horizontal" ID="RadioList" runat="server">
                                <asp:ListItem Text="Phân mặt hàng" Value="0" Selected="True"></asp:ListItem>
                                 <asp:ListItem Text="Phân khách hàng" Value="1"></asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                        <td>
                            <asp:GridView ID="grvTDV" runat="server" AutoGenerateColumns="False" 
                                        onrowcommand="grvTDV_RowCommand" 
                                        
                                         DataKeyNames="salesp_key" EnableModelValidation="True">
                                         <Columns>
                            <asp:TemplateField HeaderText="Stt">
                                <HeaderTemplate>
                                                                    STT
                                                                
                                         
                                </HeaderTemplate>
                            <ItemTemplate>
                                                                    <%# Container.DataItemIndex + 1 %>
                                                                
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="50px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Mã TDV"><HeaderTemplate>
                                                                   Mã TDV
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                  
                  <asp:Label ID="lblsalesp_key" runat="server" Text='<%# Eval("salesp_key")%>'></asp:Label>                                               
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="100px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Họ tên"><HeaderTemplate>
                                                                   Họ tên
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblsalesp_name" runat="server" Text='<%# Eval("salesp_name")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="200px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Cấp bậc"><HeaderTemplate>
                                                                   Cấp bậc
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblCapBac" runat="server" Text='<%# Eval("CapBac")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="200px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Tuyến trên"><HeaderTemplate>
                                                                   Báo cáo cho
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblRecommender" runat="server" Text='<%# Eval("Recommender")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="250px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="250px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Cấp bậc tuyến trên"><HeaderTemplate>
                                                                  Cấp bậc tuyến trên
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblCapBacRecommender" runat="server" Text='<%# Eval("CapBacTuyenTren")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="200px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
</asp:TemplateField>

<asp:TemplateField HeaderText="Đã phân SKU">
<HeaderTemplate>
                                                                  Đã phân SKU
                                                                
</HeaderTemplate>
<ItemTemplate>
            <asp:CheckBox ID="chIsSet" Enabled="false" runat="server" Checked='<%# Eval("isSet")%>' />                                                  
                                                              
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="100px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
</asp:TemplateField>

<asp:TemplateField HeaderText="Đã phân khách hàng">
<HeaderTemplate>
                                                                  Đã phân khách hàng
                                                                
</HeaderTemplate>
<ItemTemplate>
            <asp:CheckBox ID="chIsSetKH" Enabled="false" runat="server" Checked='<%# Eval("isSetKH")%>' />                                                  
                                                              
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="100px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
</asp:TemplateField>
<asp:TemplateField>
                                                                 <ItemTemplate>
                                                                    <asp:ImageButton ID="imgBtnChon" runat="server" CausesValidation="False" 
                                                                    CommandName="chon" Height="20px" ImageUrl="~/Images/check.png" />
                                                                </ItemTemplate>
                                                                <ControlStyle BackColor="White" BorderColor="White" />
                                                                <FooterStyle BackColor="White" BorderColor="White" />
                                                                <HeaderStyle BackColor="White" BorderColor="White" />
                                                                <ItemStyle BackColor="White" BorderColor="White" />
                                                            </asp:TemplateField>
</Columns>
</asp:GridView>
                        </td>
                        </tr>
        </table>
        </div>
       
      </ContentTemplate>
 </asp:UpdatePanel>